<script lang="ts" setup>
import type { CSSProperties } from 'vue'

const props = withDefaults(
  defineProps<{ size?: number | string; title?: string }>(),
  {
    size: 24,
  },
)

const titleStyle = computed<CSSProperties>(() => {
  return {
    fontSize: `${props.size}px`,
  }
})
</script>

<template>
  <span v-if="title" :style="titleStyle" class="ml-2 truncate">
    {{ title }}
  </span>
</template>

<style scoped></style>
